<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" isELIgnored="false" %>
<%-- 引入JSTL标签库 --%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>员工信息列表</title>
</head>
<body>
<table border="1" cellpadding="0" cellspacing="0" style="text-align: center;" id="dataTable">
    <tr>
        <th colspan="5">员工信息</th>
    </tr>
    <tr>
        <th>员工编号</th>
        <th>员工姓名</th>
        <th>员工性别</th>
        <th>公司邮箱</th>
        <th>操作(<a href="/employee/toAdd">add</a>)</th>
    </tr>
    <c:forEach items="${employeeList}" var="list" varStatus="status">
        <tr>
            <td>${list.id}</td>
            <td>${list.name}</td>
            <td>${list.email}</td>
            <td>${list.gender}</td>
            <td>
                <a href="deleteEmployee?id=${list.id}">删除</a>
                &nbsp;|&nbsp;
                <a href="updateEmployee?id=${list.id}">修改</a>
            </td>
        </tr>
    </c:forEach>
</table>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
</body>
</html>